﻿/*
 * Authors:    Kęstutis Džiautas
 *             Edmundas Matusevičius
 * University: VU, MIF, SE, 4 course
 * Date:       2010-10-23
 * Version:    1.0
 */

using System;

namespace LexAnalizer {
    public class TreeNodeData {
        /// <summary>
        /// Compares this data object to provided data object.
        /// </summary>
        public bool Equals(TreeNodeData data) {
            // if no data object was provided
            if (data == null) {
                return false;
            }

            // compare using string's equals methods
            return data.action.Equals(action) &&
                   data.condition.Equals(condition) &&
                   data.state.Equals(state);
        }

        /// <summary>
        /// Condition to enter the state.
        /// </summary>
        public string condition { get; set; }
        /// <summary>
        /// States name.
        /// </summary>
        public string state { get; set; }
        /// <summary>
        /// Actions to be taken after entering the state.
        /// </summary>
        public string action { get; set; }
    }
}
